package com.approval.approvalapp.util;

import android.util.Log;

/**
 * Created by louyulin on 2019/3/19.
 */

public class LogUtil {


    //单例
    private static LogUtil instance;
    //打印调试开关
    private static boolean IS_DEBUG = false;

    private LogUtil() {

    }

    //单例模式初始化
    public static LogUtil getInstance() {
        if (instance == null) {
            synchronized (LogUtil.class) {
                if (instance == null) {
                    instance = new LogUtil();
                }
            }
        }
        return instance;
    }

    public synchronized void d(String tag,String text) {
        if (IS_DEBUG) {
            Log.d(tag, text);
        }
    }
}




